export function generateColumns() {
  return [
    {
      title: this.$t("module.configureList.dataId"),
      key: "dataId",
      sortable: true,
      minWidth: 120
    },
    {
      title: this.$t("module.configureList.group"),
      key: "group",
      sortable: true,
      minWidth: 100
    },
    {
      title: this.$t("module.configureList.belongApp"),
      key: "appName",
      sortable: true,
      minWidth: 100
    },
    {
      title: this.$t("common.operating"),
      align: "left",
      // fixed: "right",
      width: 180,
      render: (h, params) => {
        return h(
          "div",
          {
            style: {
              display: "flex"
            }
          },
          [
            h("RowTools", {
              props: {
                data: [
                  {
                    type: "icon",
                    icon: "ios-eye",
                    text: this.$t("common.detail"),
                    handle: () => {
                      this.detailHandle(params.row);
                    }
                  },
                  {
                    type: "icon",
                    icon: "md-create",
                    text: this.$t("common.edit"),
                    handle: () => {
                      this.editHandle(params.row);
                    }
                  },
                  {
                    type: "icon",
                    icon: "md-trash",
                    text: this.$t("common.delete"),
                    handle: () => {
                      this.deleteHandle(params.row);
                    }
                  }
                ]
              }
            }),
            h("moreBtn", {
              on: {
                btnClick: e => {
                  this.moreHandle(e, params.row);
                }
              },
              style: {
                marginLeft: "10px"
              }
            })
          ]
        );
      }
    }
  ];
}
